1. Field of the Invention
The present invention relates generally to an apparatus adapted to prepare image reproduction data used for reproducing images by an output device such as a cathode ray tube (CRT), a laser printer and an X-Y plotter. More particularly, the invention is concerned with data processing to prepare solid-imaging data for solid imaging in enclosed solid-imaging area or areas within the outline of a figure or other visible representation defined by original image data.
2. Discussion of the Prior Art
A figure or visible representation to be reproduced is widely defined by original image data in the form of vector data representative of vectors which represent a plurality of straight line segments each extending in a given direction from a specified start point to a specified end point, so that the straight line segments define the outline of the figure. Frequently, the outline of the figure thus defined by the vector data has one or more enclosed solid-imaging areas which are entirely illuminated, inked or otherwise solid-imaged by an output device. These solid-imaging areas are defined by solid-imaging data which are prepared from the vector data. When the output device such as a CRT or a printer is operated according to the solid-imaging data, a solid imaging is effected in a portion of a CRT screen or a recording medium corresponding to each enclosed solid-imaging area within the outline of the relevant figure. Namely, the solid-imaging data is used as image reproduction data for reproducing the figure. For convenience's sake, the figure whose enclosed solid-imaging area or areas have been solid-imaged will be referred to as "solid-imaged figure" as distinguished from the figure whose outline is merely defined by the original image data (vector data).
The solid-imaging data representative of the enclosed solid-imaging area or areas is prepared by a known method, in which the number of windings of the figure whose outline is defined by a plurality of vectors is calculated. The solid-imaging data is prepared based on the result of the calculation. For example, a FIG. 102 indicated in FIG. 7 is scanned along a multiplicity of parallel scanning lines 104 104, on which the outline of the FIG. 102 defined by vectors 106 is superimposed. For each scanning line 104, the number of intersections between that scanning line 104 and the vectors 106 is counted in positive and negative directions depending upon the direction in which each vector 106 intersects the scanning line 104. The thus counted number of intersections will be referred to as "winding count", and the solid-imaging area or areas of the figure 102 are determined based on the obtained winding count. In the example of FIG. 7, the winding count for each scanning line 104 is incremented when the relevant vector 106 intersects the scanning line 104 in the upward direction, and decremented when the vector 106 intersects the scanning line in the downward direction. As indicated in FIG. 7, the winding count outside the outline of the FIG. 102 is "0", while that inside the outline is "1". That is, the FIG. 102 has a single winding and a single solid-imaging area whose winding count is "1".
The determination of the solid-imaging area is made, for example, according to an "even-odd rule" or "non-zero winding rule". In the even-odd rule, each area of the figure whose winding count is an odd number is defined as a "solid-imaging area", and each area of the figure whose winding count is an even number is defined as a "non-solid-imaging area". In the non-zero winding rule, an area of the figure whose winding count is other than "0" is defined as the solid-imaging area, while an area of the figure whose winding count is "0" is defined as the non-solid-imaging area.
When the solid-imaging data prepared according to the even-odd rule, for example, is executed, the enclosed area of the FIG. 102 whose winding count is "1" is solid-imaged as indicated by hatched lines. FIGS. 8 and 9 illustrate FIGS. 108 and 110 which have one enclosed solid-imaging area and two enclosed solid-imaging areas, respectively. These solid-imaging areas are also indicated by hatched lines. In the case of FIG. 8, the solid-imaging area is represented by the odd winding count "1" as indicated at (1). In the case of FIG. 9, the solid-imaging areas are represented by the odd winding counts "1" and "2" as indicated at (1) and (3).
The same result as obtained according to the even-odd rule is obtained with respect to the FIGS. 102 and 108 of FIGS. 7 and 8, where the non-zero winding rule is applied. In the case of the FIG. 110, the solid-imaging data prepared according to the non-zero winding rule is different from that prepared according to the odd-even rule. Namely, three solid-imaging areas are obtained according to the non-zero winding rule, as indicated at (1), (2) and (3) in FIG. 10.
A control program for preparing the solid-imaging data according to the even-odd rule is illustrated in the flow chart of FIG. 11. Initially, a counter for counting the winding count for each scanning line is cleared or reset to zero in step S101. Then, in steps S102 through S105, the winding count for each scanning line is incremented or decremented depending upon the direction in which the vectors defining the outline of a figure in question intersect the relevant scanning line. In the following steps S106, S107 and S108, each intersection of the scanning line with the appropriate vector is set as the start or end point of a solid-imaging area as viewed along that scanning line, depending upon whether the current winding count is an odd number or an even number. After the settings in steps S107 and S108 are completed for all the scanning lines which intersect the outline of the figure, solid-imaging data for the figure are prepared based on the settings obtained in steps S107 and S108. Namely, the solid-imaging data for a solid-imaging area or areas of the figure are prepared.
However, the known method as described above for preparing the image reproduction data from the original image data suffers from low efficiency due to a considerably long time required for preparing the solid-imaging data. It is noted that the determination as to whether the winding count for each scanning line is an odd or even number is required for only such figures as the FIGS. 108 and 110 of FIGS. 8 and 9, whose vectorial outline has two or more maximal values (and two or more minimal values). In this respect, the number of the maximal values of a figure are always equal to that of the minimal values of the figure. In other words, the determination indicated above is not required for figures having simple outlines such as rectangular or circular shapes, or for figures as the FIG. 102 of FIG. 7, whose vectorial outline is complicated but has only one maximal value and only one minimal value. It is evident that the outline of these figures has only two intersections with respect to each scanning line, and that the above determination as to the winding count is not necessary to prepare the solid-imaging data that define an enclosed solid-imaging area between the two intersections of each scanning line. In spite of this fact, however, the known apparatus to prepare the solid-imaging data is adapted to make the same determination as required for the complicated figures like the figures of FIGS. 8 and 9, even for those figures which do not actually require the determination to prepare the solid-imaging data. Accordingly, the preparation of the solid-imaging data takes a considerable time. For instance, the preparation of the solid-imaging data for the FIG. 102 of FIG. 7 requires that steps S102 through S108 of the flow chart of FIG. 11 be repeated two times for each scanning line 104, resulting in a relatively long time spent in preparing the solid-imaging data for all the scanning lines 104 intersecting the FIG. 102.